<template>
    <nav class="main-nav">
        <div class="nav-container">
            <div class="nav-brand">
                <router-link to="/upload" class="brand-link">
                    <h2>RAG 智能问答</h2>
                </router-link>
            </div>
            <div class="nav-links">
                <router-link to="/upload" class="nav-link">文档上传</router-link>
                <router-link to="/chat" class="nav-link">AI问答</router-link>
            </div>
        </div>
    </nav>
</template>

<style scoped>
.main-nav {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    height: 70px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-brand h2 {
    margin: 0;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.brand-link {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.brand-link:hover {
    color: #3498db;
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-link {
    color: #bdc3c7;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    position: relative;
}

.nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.nav-link.router-link-active {
    color: #3498db;
    background: rgba(52, 152, 219, 0.15);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

@media (max-width: 992px) {
    .nav-container {
        padding: 0 1.5rem;
    }

    .nav-brand h2 {
        font-size: 1.3rem;
    }

    .nav-links {
        gap: 0.5rem;
    }

    .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }

    .nav-brand h2 {
        font-size: 1.2rem;
    }

    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
}
</style>
